package com.yullage.ann.core;

public class Connection {

	private static int counter = 0;
	public final int id; // auto increment, starts at 0

	private double weight = 0;

	private final Neuron fromNeuron;
	private final Neuron toNeuron;

	public Connection(Neuron fromN, Neuron toN) {
		id = counter;
		counter++;

		fromNeuron = fromN;
		toNeuron = toN;
	}

	public double getWeight() {
		return weight;
	}

	public void setWeight(double w) {
		weight = w;
	}

	public Neuron getFromNeuron() {
		return fromNeuron;
	}

	public Neuron getToNeuron() {
		return toNeuron;
	}

}
